{// 加载头部公共文件 }
<include file="Public:header" />
<div class="main">
	<div class="content">
		<table id="checkList" class="list" cellpadding=0 cellspacing=0>
			<tr>
				<td height="3" colspan="4" class="toptd"></td>
			</tr>
			<tr class="row">
				<th colspan="4" class="space">查询充值</th>
			</tr>
			<tr class="row">
				<th class="space">玩家名称</th>
				<th class="space">充值金额</th>
				<th class="space">充值内容</th>
				<th class="space">充值时间</th>
			</tr>
			<volist name="info" id="v">
			<tr class="row">
				<td >{$v.nickname}-Lv {$v.lv}</td>
				<td >{$v.pay_gold}</td>
				<td >{$v.payitem}</td>
				<td>{$v.pay_time|date='Y-m-d H:i:s',###}</td>
			</tr>
			</volist>
			<tr>
				<td height="3" colspan="4" class="bottomtd">总额:{$payTotal}</td>
			</tr>
			<tr>
				<td height="3" colspan="4" class="bottomtd">实际收入:{$realTotal}</td>
			</tr>
		</table>
	</div>
</div>
<!-- 主页面结束 -->
{// 加载尾部公共文件 }
<script type="text/javascript">
	
	function giveGold()
	{
		var econtent = escape($("#uname").val());
		var gtype	=	$("#mtype").val();
		var gcount	=	$("#money_count").val();
		$.get("{:U('Game/addGold')}/type/"+gtype+"/user/" + userid+"/count/"+gcount, function(data) {
			alert(data);
		});
	}
	
	function resetAll()
	{
		$("#money_count").attr("disabled","true");
		$("#moneyBtn").attr("disabled","true");
	}
	
	function enableAll()
	{
		$("#money_count").removeAttr("disabled");
		$("#moneyBtn").removeAttr("disabled");
	}
	var userid	=	"";
	/**
	* 检查玩家
	**/
	function checkUser()
	{
		username	=	$("#uname").val();
		var urldata	=	{};
		urldata.type	=	"user";
		urldata.name	=	username;
		//var econtent = escape(username);
		$.get("{:U('Game/query')}",urldata, function(data) {
			if(data=="")
			{
				//玩家不存在
				resetAll();
			}
			else
			{
				enableAll();
				userid	=	data;
				$("#userinfo").html(userid);
			}
		});
	}
	
</script>